<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core">

<h:head>
	<!-- include meta, stylesheets, jquery and title -->
	<ui:include src="/WEB-INF/master/implement.xhtml" />
</h:head>

<h:body>

	<!-- display the login form -->

	<f:event listener="#{loginController.checkoutCustomer()}" type="preRenderView" />

	<ui:include src="/WEB-INF/master/header.xhtml" />
	<div class="container navigation">

		<h2>Login</h2>
		<hr />

		<h:form id="loginForm">
			<h:panelGrid id="grid" columns="3" cellpadding="5">

				<h:outputLabel for="email" value="E-Mail:" style="font-weight:bold; width: 100px" />
				<p:inputText id="email" value="#{login.email}" required="true" label="email" requiredMessage="Bitte E-Mail Adresse eingeben!">
				</p:inputText>

				<p:message for="email" />


				<h:outputLabel for="password" value="Passwort:" style="font-weight:bold; width: 100px" />
				<p:password id="password" value="#{login.password}" required="true" requiredMessage="Bitte Kennwort eingeben!" />

				<p:message for="password" />


			</h:panelGrid>
			
			<hr/>
			
			<p:commandButton action="#{loginController.checkPassword()}" value="Login" update="grid" validateClient="true" style="margin-right:10px" />
		</h:form>
	</div>

</h:body>
</html>
